package auth

import (
	. "leaf/common"
	"leaf/core"
	"leaf/core/conf"
	"leaf/core/gate"
	"leaf/model"
	_ "leaf/server/auth/console"
	"leaf/server/auth/handle"
)

func Run(path string) {
	//初始化配置，log
	closer := core.Init(path, SERVER_TYPE_MAP)
	if closer != nil {
		defer closer()
	}
	//初始化handle
	handle.Init()
	//初始db数据
	model.LoadData()

	core.Run(gate.NewGate(conf.Config.WSAddr))
}
